package com.nidu.demo.mail.dto;

import com.nidu.demo.base.BaseCO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

/**
 * 邮件日志客户端对象
 *
 * @author auto
 */
@Data
@Schema(description = "邮件日志客户端对象")
@EqualsAndHashCode(callSuper = true)
public class MailLogCO extends BaseCO {

    @Schema(description = "主键ID", example = "1")
    private Long id;

    @Schema(description = "用户编号", example = "1")
    private Long userId;

    @Schema(description = "用户类型", example = "1")
    private Integer userType;

    @Schema(description = "接收邮箱地址", example = "user@example.com")
    private List<String> toMails;

    @Schema(description = "抄送邮箱地址", example = "cc@example.com")
    private List<String> ccMails;

    @Schema(description = "密送邮箱地址", example = "bcc@example.com")
    private List<String> bccMails;

    @Schema(description = "邮箱账号编号", example = "1")
    private Long accountId;

    @Schema(description = "发送邮箱地址", example = "admin@example.com")
    private String fromMail;

    @Schema(description = "模板编号", example = "1")
    private Long templateId;

    @Schema(description = "模板编码", example = "USER_REGISTER")
    private String templateCode;

    @Schema(description = "模版发送人名称", example = "系统管理员")
    private String templateNickname;

    @Schema(description = "邮件标题", example = "欢迎注册")
    private String templateTitle;

    @Schema(description = "邮件内容", example = "欢迎您注册我们的系统")
    private String templateContent;

    @Schema(description = "邮件参数", example = "{\"username\":\"张三\"}")
    private Map<String, Object> templateParams;

    @Schema(description = "发送状态", example = "1")
    private Integer sendStatus;

    @Schema(description = "发送时间", example = "2025-01-01 12:00:00")
    private LocalDateTime sendTime;

    @Schema(description = "发送返回的消息 ID", example = "msg_123456")
    private String sendMessageId;

    @Schema(description = "发送异常", example = "连接超时")
    private String sendException;

}
